﻿@model PagedList.IPagedList<XichLoGreen.Models.NewsModel>
@using System.Data.Entity;
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<link href="@Url.Content("~/Content/PagedList.css")" type="text/css" rel="stylesheet" />



@*@foreach (var item in Model)
{
    <table>
        <tr><font color="blue"> <b>@Html.DisplayFor(modelItem => item.Title)</b></font></tr>
        <tr>@Html.DisplayFor(modelItem => item.Summary)</tr>
    </table> 
    <br />
    <br />   
}*@
<div>
    Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    of @Model.PageCount
    &nbsp;
	@if (Model.HasPreviousPage)
 {
        @Html.ActionLink("<<", "Index", new { page = 1 })
        @Html.Raw("&nbsp;");
        @Html.ActionLink("< Prev", "Index", new { page = Model.PageNumber - 1 })
 }
 else
 {
        @:<<
        @Html.Raw("&nbsp;");
        @:< Prev
    }
    &nbsp;
   @if (Model.HasNextPage)
   {
       @Html.ActionLink("Next >", "Index", new { page = Model.PageNumber + 1 })
       @Html.Raw("&nbsp;");
       @Html.ActionLink(">>", "Index", new { page = Model.PageCount })
   }
   else
   {
       @:Next >
       @Html.Raw("&nbsp;");
       @:>>
 }
</div>
